package com.bigknow.appstore.web.base.entity;

import com.bigknow.appstore.web.framework.entity.QueryField;
import com.bigknow.appstore.web.framework.entity.BaseEntity;
import com.bigknow.appstore.web.framework.entity.IEntity;
import com.bigknow.appstore.web.base.entity.enums.State;
import org.mongodb.morphia.annotations.Entity;
import org.mongodb.morphia.annotations.Indexed;

import javax.xml.bind.annotation.XmlRootElement;

@XmlRootElement //默认Entity bean都能解析为xml 必须加入这个注解
@Entity("web.base.user")
public class User extends BaseEntity implements IEntity {
    /**
     * 姓名
     */
    @QueryField
    private String name;
    /**
     * 账号
     */
    @QueryField
    @Indexed(unique = true)
    private String account;
    /**
     * 密码
     */
    private String password;
    /**
     * 年龄
     */
    @QueryField
    private Integer age;

    /**
     * 性别
     */
    private String sex;
    /**
     * 电话号码
     */
    private String telephone;
//    /**
//     * 手机号码
//     */
//    private String mobilePhone;
//    /**
//     * 邮箱
//     */
//    private String email;
    /**
     * 地址
     */
    private String address;
    /**
     * 描述
     */
    @QueryField
    private String description;
    /**
     * 状态
     */
    private State state;

    private String roleIds;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAccount() {
        return account;
    }

    public void setAccount(String account) {
        this.account = account;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public String getTelephone() {
        return telephone;
    }

    public void setTelephone(String telephone) {
        this.telephone = telephone;
    }

//    public String getMobilePhone() {
//        return mobilePhone;
//    }
//
//    public void setMobilePhone(String mobilePhone) {
//        this.mobilePhone = mobilePhone;
//    }
//
//    public String getEmail() {
//        return email;
//    }
//
//    public void setEmail(String email) {
//        this.email = email;
//    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public State getState() {
        return state;
    }

    public void setState(State state) {
        this.state = state;
    }

    public String getRoleIds() {
        return roleIds;
    }

    public void setRoleIds(String roleIds) {
        this.roleIds = roleIds;
    }
}